babl: replace a fprintf (stderr, ...) with babl_log().
authorJehan <jehan@girinstud.io>
Tue, 4 Jul 2017 14:47:52 +0000 (16:47 +0200)
committerJehan <jehan@girinstud.io>
Sat, 16 Sep 2017 09:56:05 +0000 (11:56 +0200)
It will make it visible in the logcat, for instance in Android Studio.
As a general rule, we should use babl_log() for anything which we
consider as "logs", unless we want to direct them to a given output for
sure (for instance in the case of CLI tools where we want the output to
be on standard I/O in terminal, fprintf() still is the best choice).

babl/babl-extension.c

index 8edb60d0807e3b669fce76146a38c72ad70d6ca5..8e85be5844fa071547e6cba0950ccebf34ed8690 100644 (file)
@@ -348,11 +348,10 @@ babl_extension_load_dir_list (const char *dir_list)
   babl_free (path);
   if (babl_db_count (db) <= 1)
   {
-    fprintf (stderr,
-"WARNING: the babl installation seems broken, no extensions found in queried\n"
-"BABL_PATH (%s) this means no SIMD/instructions/special case fast paths and\n"
-"only slow reference conversions are available, applications might still\n"
-"run but software relying on babl for conversions will be slow\n", dir_list);
+    babl_log ("WARNING: the babl installation seems broken, no extensions found in queried\n"
+              "BABL_PATH (%s) this means no SIMD/instructions/special case fast paths and\n"
+              "only slow reference conversions are available, applications might still\n"
+              "run but software relying on babl for conversions will be slow\n", dir_list);
   }
 }